package cn.wolfcode.cloud.shop.web.controller;


import cn.wolfcode.cloud.shop.domain.User;
import cn.wolfcode.cloud.shop.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/users")
public class UserController {

    @Autowired
    private IUserService userService;

    @RequestMapping("/{id}")
    public User selectById(@PathVariable("id") Long id){
       return userService.selectById(id);
    }

}
